package com.groupnections.client.Entities;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.groupnections.client.LiveFeed.ListLiveFeed;
import com.groupnections.shared.Entity;

public class GetEntity {

	public GetEntity(String entityID) {

		final EntitiesDatabaseServerCallsAsync databaseServerCalls = GWT
				.create(EntitiesDatabaseServerCalls.class);

		databaseServerCalls.getEntity(entityID, new AsyncCallback<Entity>() {

			public void onSuccess(Entity entity) {

				new ListLiveFeed(entity);
			}

			public void onFailure(Throwable caught) {
				// Show the RPC error message to the user

			}

		});

	}

}
